﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Truck
{
    //对外接口，实现文件的发送和接收
    public interface I_Truck:IDisposable
    {
        /// <summary>
        /// 收到文件,flag=0:开始接收;flag=1:接收完毕
        /// </summary>
        event Action<int> RCV_EVENT;
        /// <summary>
        /// 发送
        /// </summary>
        /// <param name="filePath">文件路径</param>
        void send(string filePath);
        /// <summary>
        /// 开启线程接收
        /// </summary>
        void startRcv(string filePath);
        /// <summary>
        /// 结束接收线程，如果正在接收文件则终止接收并删除文件
        /// </summary>
        void stopRcv();
    }
}
